// 乒乓球会会员
class TableTennisPlayer {
public:
  TableTennisPlayer(const char *fn = "none", const char *ln = "none",
                    bool ht = false);
  void Name() const;
  bool HasTable() const { return hasTable; }
  void ResetTable(bool v) { hasTable = v; }

private:
  enum { LIM = 20 };
  char firstname[LIM];
  char lastname[LIM];
  bool hasTable;
};

// 定义一个派生类
class RatedPlayer : public TableTennisPlayer {
public:
  RatedPlayer(unsigned int r = 0, const char *fn = "none",
              const char *ln = "none", bool ht = false);
  RatedPlayer(unsigned int r, TableTennisPlayer &tp);
  unsigned int Rating() { return rating; }
  void ResetRating(unsigned int r) { rating = r; }

private:
  unsigned int rating;
};
